﻿---
title: "Quickstart"
---

## Install it and run the demo app

<Tip>
It works on Linux, Mac, and Windows. Python 3.9.2 or higher is required. We recommend using a virtual environment.
</Tip>

<Steps>
  <Step title="Install Framework">
    Use the following command to install the necessary framework using `pip`. Open your command line interface and type:
    ```bash
    pip install writer
    ```
    This will download and install Framework and all its required dependencies.
  </Step>
  <Step title="Start demo application">
    Once the installation is complete, you can create a demo application and start the Framework. To do this, navigate to your desired directory and run:
    ```bash
    writer hello
    ```
    This command creates a subfolder named **hello** and initiates the Framework, which opens a visual editor accessible through a local URL displayed in your command line.
  </Step>
</Steps>

## Create an app

You can use the command `writer create`, which will create a placeholder app in the path provided.

```sh
writer create [path]

# Creates a new app in folder "testapp"
writer create testapp
```

A Framework app is a folder with the following items.

1. `main.py` - The entry point for the app. You can import anything you need from here.
2. `ui.json` - Contains the UI component declarations. Maintained by the Writer Framework's visual editor.
3. `static/` - This folder contains front-end static files which you might want to distribute with your app. For example, images and stylesheets.

## Start the editor

You can use the command `writer edit`.

```sh
writer edit [path]

# Edit the application in subfolder "testapp"
writer edit testapp
```

This command will provide you with a local URL which you can use to access the Builder.

<Warning>
It's not recommended to expose Framework to the Internet. If you need to access the Builder remotely, we recommend setting up an SSH tunnel. By default, requests from non-local origins are rejected, as a security measure to protect against drive-by attacks. 

If you need to disable this protection, use the flag `--enable-remote-edit`. 
</Warning>

## Run an app

When your app is ready, execute the `run` command, which will allow others to run, but not edit, your Framework app.

```sh
writer run my_app
```

You can specify a port and host. Specifying `--host 0.0.0.0` enables you to share your application in your local network.

```sh
writer run my_app --port 5000 --host 0.0.0.0
```

## Run as a module

If you need to run Framework as a module, you can use the `writer.command_line` module.

```sh
python -m writer.command_line run my_app
```

## Deploying on Writer cloud
Writer provides a quick and fast way to deploy your apps via the Writer cloud.

```sh
writer deploy <my_app_name>
```

You’ll be asked to enter your API key. To find your key, log in to your [AI Studio account](https://app.writer.com/aistudio) and either create a new framework app by going through the create app workflow or choose an existing framework app from your home screen. For other deployment options, see [Deploy with Docker](/framework/deploy-with-docker).